package applet;
import processing.core.PApplet;

class GuiElement
{
	
    public int x;
    public int y;
    
    public int width;
    public int height;
    
    public int alphaVal=255;
    public int backColor;
    
    public boolean active = false;
    
  
    public GuiElement()
    {
        backColor = GLOBAL.colorButtonBackground;//GLOBAL.processing.color(200, 180, 255, 40);
    }
  
    public void draw()
    {

    	GLOBAL.processing.rectMode(PApplet.CORNER);

    	GLOBAL.processing.noStroke();
    	GLOBAL.processing.fill(/*GLOBAL.colorButtonBackground*/backColor,(int)(0.9*alphaVal));
    	GLOBAL.processing.rect(x, y, width, height);
    	
    	GLOBAL.gu.drawBox(x, y, width, height, 0, GLOBAL.processing.color(255, 255, 255), (int)(0.9*alphaVal));
    	GLOBAL.gu.drawBox(x, y, width, height, 1, GLOBAL.processing.color(0, 0, 0), (int)(0.9*alphaVal));
    }
    
    public boolean mouseOver()
    {
    	if(GLOBAL.processing.mouseX >= x && GLOBAL.processing.mouseX <= x + width && 
    			GLOBAL.processing.mouseY >= y && GLOBAL.processing.mouseY <= y + height) return true;
    	return false;
    }

}